package ch02;

/**
 * EmployeeTester tests Employee Class.
 * 
 * @author Peter Tolstrup Aagesen
 * 
 * Exercise #2.16
 */
public class EmployeeTester {
	
	public static void main(String[] args) {
		//Create variable for test Employee object
		String testEmployeeName = "Morgan, Harry";
		double testEmployeeSalary = 50000d;
		double testEmployeeSalaryRaise = 7.5d;
		//Create test Employee object
		Employee testEmployee = new Employee(testEmployeeName, testEmployeeSalary);
		
		//TEST
		//Test name and salary:
		System.out.println("Test Employee name: '" + testEmployee.getName() + "',  Expected: '" + testEmployeeName + "'.");
		System.out.println("Test Employee salary: " + testEmployee.getSalary() + ", Expected at this point: " + testEmployeeSalary + ".");
		//Raise salary
		testEmployee.raiseSalary(testEmployeeSalaryRaise);
		//Test raiseSalary
		System.out.print("Raise after " + testEmployeeSalaryRaise + "% salary raise: " + testEmployee.getSalary() + ", ");
		System.out.println("Expected salary after salary raise: " + testEmployeeSalary * (1 + testEmployeeSalaryRaise * 0.01));
		
	}

}
